import request from '../utils/request'

const selectCarApi = {
	getCarType(){
		return request.get('/car-service/hitCar/getType')
	},
	getCar(kilometer){
		return request.get(`/car-service/hitCar/getCarTypes?kilometer=${kilometer}`)
	},
	insertOrder(tripOrder){
		return request.post('/order-service/order/createOrder',tripOrder)
	},
	//判断订单是否被司机接单
	isRob(orderId){
		return request.get(`/order-service/order/isRob?orderId=${orderId}`)
	},
	//长时间没司机接单删除订单
	deleteOrder(orderId){
		return request.post(`/order-service/order/deleteOrder?orderId=${orderId}`)
	},
	//系统自动接单
	automaticOrder(orderId){
		return request.post(`/driver-service/driver/automaticOrder?orderId=${orderId}`)
	},
	//通过订单编号查订单信息
	getOrderInfo(orderId){
		return request.get(`/order-service/order/orderInfo?orderId=${orderId}`)
	},
	//查询司机信息
	getDrivers(orderId){
		return request.get(`/driver-service/driver/getDriver?orderId=${orderId}`)
	}
}
export default selectCarApi